﻿using FreeSql.DataAnnotations;
using System;
using System.Collections.Generic;

using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RsCms.Core.Promote.Entities
{
	[Table(Name="promote_code")]
	public class PromoteCodeInfo
	{
		[Column(IsIdentity = true, IsPrimary = true)]
		public long Id { get; set; }

		public DateTime CreateDate { get; set; } = DateTime.Now;

        public string Code { get; set; }

        public string UserId { get; set; }

		public string Description { get; set; } = "";

        public int Limit { get; set; }

		public bool Valid { get; set; } = true;

		public void SetUserId(string userId)
		{
			UserId= userId;
		}

		public void SetLimit(int limit)
		{
			Limit= limit;
		}
		public void SetValid(bool valid)
		{
			Valid= valid;
		}
    }
}
